package com.neuedu.ylbx.controller;

import com.neuedu.ylbx.service.InpatientMedicalService;
import com.neuedu.ylbx.utils.ResultVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version V1.0
 * @author: xianzhen
 * @date: 2025/7/9
 */

@RestController
@RequestMapping("/inpatientMedical")
@Tag(name = "住院医保控制器")
@CrossOrigin
public class InpatientMedicalController {
    @Autowired
    private InpatientMedicalService inpatientMedicalService;

    @RequestMapping("/getInpatientMedical")
    @Operation(summary = "获取医疗服务列表")
    public ResultVo getInpatientMedical() throws Exception {
        return inpatientMedicalService.list( null, null);
    }
    @RequestMapping("/addInpatientMedical")
    @Operation(summary = "添加医疗服务")
    public ResultVo addInpatientMedical(String medicalServiceName, String medicalServiceNumber, String medicalServiceCountryNumber, String medicalServiceType, String medicalServiceInfo, Double medicalServicePrice, String medicalServiceExclude, String medicalServiceUnit, String remark) throws Exception {
        return inpatientMedicalService.add(medicalServiceName, medicalServiceNumber, medicalServiceCountryNumber, medicalServiceType, medicalServiceInfo, medicalServicePrice, medicalServiceExclude, medicalServiceUnit, remark);
    }
    @RequestMapping("/queryInpatientMedical")
    @Operation(summary = "查询医疗服务")
    public ResultVo queryInpatientMedical(String medicalServiceName, String medicalServiceNumber) throws Exception {
        return inpatientMedicalService.query(medicalServiceName, medicalServiceNumber);
    }
}
